/* import {
	ArtAdd,
	ArtEdit,
	ArtList,
	Login,
	Message,
	NotFound,
	Setting,
	NoPerssion,
	DashBoard
} from 'pages' */
 import {
	Login,
	NotFound,
	NoPerssion
} from 'pages'

import Loadable from 'react-loadable'
import Loading from 'components/Loading'


import {
  LineChartOutlined,
	PictureOutlined,
	WhatsAppOutlined,
	SettingOutlined
} from '@ant-design/icons';
// 基础路由

const baseRoutes = [
	{
		path: "/login",
		component: Login
	}, 
	{
		path:"/404",
		component: NotFound,
	}
]

// 权限路由 （admin主页中二级路由）
const authRoutes = [
  {
  	path:"/admin/noPerssion",
  	component:NoPerssion,
    name: '没有权限',
    meta: {
      isNav:false,
      roles: "*"
    }
  },
	{
		path: '/admin/dashboard',
		component: Loadable({
			loader: () => import('pages/DashBoard'),
			loading: Loading,
		}),
		icon:LineChartOutlined,
		name:"仪表盘",
		meta:{
			isNav:true,
      roles: ['admin','superAdmin','editor']
		}
	},
	{
		path: '/admin/artlist',
		component: Loadable({
			loader: () => import('pages/ArtList'),
			loading: Loading,
		}),
		icon:PictureOutlined,
		name:"文章列表",
		meta:{
			isNav:true,
      roles: ['admin','superAdmin','editor']
		}
	},
	{
		path: '/admin/artadd',
		component: Loadable({
			loader: () => import('pages/ArtAdd'),
			loading: Loading,
		}),
		name:"添加文章",
		meta:{
			isNav:false,
      roles: ['admin','superAdmin','editor']
		}
	},
	{
		path: '/admin/artedit/:id',
		component: Loadable({
			loader: () => import('pages/ArtEdit'),
			loading: Loading,
		}),
		name:"文章编辑",
		meta:{
			isNav:false,
      roles: ['admin','superAdmin','editor']
		}
	},
	{
		path: '/admin/message',
		component: Loadable({
			loader: () => import('pages/Message'),
			loading: Loading,
		}),
		icon:WhatsAppOutlined,
		name:"消息中心",
		meta:{
			isNav:true,
      roles: ['admin','superAdmin','editor']
		}
	},
	{
		path: '/admin/setting',
		component: Loadable({
			loader: () => import('pages/Setting'),
			loading: Loading,
		}),
		icon:SettingOutlined,
		name:"设置",
		meta:{
			isNav:true,
      roles: ['superAdmin']
		}
	}
]


export {
	baseRoutes,
	authRoutes
}